import {HTTP} from "../utils/http-p";
import {getToken} from "../utils/localstorg";

class UserModel extends HTTP{
  getUserbyId(){
    const token=getToken()
    return this.request({
      url:"/user/get-user",
      method:"post",
      data:{token}
    })
  }
  editUser(_id,username,desc){
    return this.request({
      url:'/user/edit-user',
      method:'post',
      data:{_id,username,desc}
    })
  }

  editPwd(_id,pwd){
    return this.request({
      url:'/user/edit-pwd',
      method:'post',
      data:{_id,pwd}
    })
  }
}


export {UserModel}
